#!/bin/bash

set -e

echo "[pull.sh] 开始同步远程仓库..."

git reset --hard
git clean -df
git pull origin master

# 强制同步所有子模块
echo "[pull.sh] 正在同步子模块..."
git submodule sync --recursive
git submodule update --init --recursive --force

echo "最近一次提交"

git log --pretty=format:"HEAD is at %h(%s) by %cn %ci %cr" -1  | xargs -0 echo
